﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using SGRapidForm.Permission.Entity;
using SGRapidForm.Common;

namespace SGRapidForm.Permission.Service.Interface
{
    [ServiceContract(Namespace = "http://www.solutiongear.net/SGRapidForm/")]
    public interface IShortcutsService
    { 
        /// <summary>
        /// 为用户添加一个快捷方式
        /// </summary>
        /// <param name="userKeyid"></param>
        /// <param name="pageKeyid"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool Shortcuts_Add(string userKeyid, string pageKeyid);

        /// <summary>
        /// 为用户删除一个快捷方式
        /// </summary>
        /// <param name="userKeyid"></param>
        /// <param name="pageKeyid"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool Shortcuts_Delete(string userKeyid, string pageKeyid);

        /// <summary>
        /// 获取用户可见的所有快捷方式
        /// </summary>
        /// <param name="userKeyid"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        List<PermissionDetails> Shortcuts_GetAllByUserKeyid(string userKeyid, string filterConditions);

        /// <summary>
        /// 获取这个用户拥有的快捷方式
        /// </summary>
        /// <param name="userKeyid"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        List<PageEntity> Shortcuts_GetByUserKeyid(string userKeyid);

        /// <summary>
        /// 获取用户可见的快捷方式
        /// </summary>
        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        List<PermissionDetails> Shortcuts_GetListByUserKeyid(string userKeyid, string filterConditions);

    }
}
